package com.essgle.controller;

import com.essgle.bean.Account;
import com.essgle.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by essgle on 2017/7/10.
 */
@Controller
public class IndexController {
    @Autowired
    private AccountService accountServiceImpl;
    @ResponseBody
    @RequestMapping("/get")
    public List<Account> getData(){
        return  accountServiceImpl.getAll();
    }
    @RequestMapping("index")
    public String index(){
        return  "index";
    }

}
